import { List } from "antd"
import { useMemo } from "react"

export default function Key() {
    const list = useMemo(() => {
        return Array.from({ length: 10 }, (_, index) => ({
            id: index,
            name: `Item ${index.toString()}` // 使用 index.toString() 作为 key
        }))
    }, [])
    return (

            <List
                grid={{
                    gutter: 16,
                    column: 4,
                }}
                dataSource={list}
                renderItem={item => (
                    <List.Item key={item.id}>{item.name}</List.Item>
                )}
            />
    )
}
